package com.example.business.controller;

import com.example.annotation.GQController;
import com.example.annotation.GQRequestMapping;
import com.example.annotation.GQRequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@GQController
@GQRequestMapping("/web2")
public class BController {

    @GQRequestMapping("/query2")
    public void query(HttpServletRequest request, HttpServletResponse response, @GQRequestParam(value = "name") String name) {
        out(response, name);
    }

    public void out(HttpServletResponse response, String string) {
        try {
            response.getWriter().write("get params name = " + string);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
